﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Web;
using System.Web.UI;

namespace From2Object
{
    public class PageRegister<T>
    {
        Page page;
        T data;
        public PageRegister(Page Inj)
        {
            page = Inj;
            page.PreLoad += new EventHandler(page_PreLoad);
        }

        void page_PreLoad(object sender, EventArgs e)
        {
            if (page.IsPostBack)
            {
                data = Activator.CreateInstance<T>();
                Type tp = data.GetType();
                foreach (PropertyInfo ppt in tp.GetProperties())
                {
                    
                }
            }
        }

        void FillControl(T Data)
        {
        }

        public T Data
        {
            get
            {
                return data;
            }
        }
    }
}
